/* vue */
import { defineComponent } from "vue";
/* mixin */
import VersionControlBaseMixin from '@src/mixins/versionControlMixin/base';
/* version customer */
import {
  isShowCustomerSendSMS,
  isShowCustomerSendEmail,
  isShowCustomerSendActivitySurvey,
  isShowCustomerRemind,
  isShowCustomerTag,
  isShowCustomerContract
} from '@shb-lib/version'

export default defineComponent({
  name: "version-control-customer-mixin",
  mixins: [VersionControlBaseMixin],
  computed: {
    /** 
     * @description 客户模块 版本控制
    */
    customerVersionControl(): Record<string, boolean> {
      return {
        isShowCustomerSendSMS: isShowCustomerSendSMS(this._versionControlMap),
        isShowCustomerSendEmail: isShowCustomerSendEmail(this._versionControlMap),
        isShowCustomerSendActivitySurvey: isShowCustomerSendActivitySurvey(this._versionControlMap),
        isShowCustomerRemind: isShowCustomerRemind(this._versionControlMap),
        isShowCustomerTag: isShowCustomerTag(this._versionControlMap),
        isShowCustomerContract: isShowCustomerContract(this._versionControlMap),
      }
    },
    _isShowCustomerSendSMS(): boolean {
      return this.customerVersionControl.isShowCustomerSendSMS
    },
    _isShowCustomerSendEmail(): boolean {
      return this.customerVersionControl.isShowCustomerSendEmail
    },
    _isShowCustomerSendActivitySurvey(): boolean {
      return this.customerVersionControl.isShowCustomerSendActivitySurvey
    },
    _isShowCustomerRemind(): boolean {
      return this.customerVersionControl.isShowCustomerRemind
    },
    _isShowCustomerTag(): boolean {
      return this.customerVersionControl.isShowCustomerTag
    },
    _isShowCustomerContract(): boolean {
      return this.customerVersionControl.isShowCustomerContract
    },
  }
})
